package com.yonyou.ucf.mdf.SpringMvcConfig;

import com.yonyou.iuap.yms.cache.adapter.YMSCacheFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class SpringMvcConfig implements WebMvcConfigurer {


    @Value("${rediscode}")
    private String ymsRedisCode;

    @Bean("redisTemplate")
    public RedisTemplate redisTemplateCluster(YMSCacheFactory ymsCacheFactory) {
        RedisTemplate redisTemplate = ymsCacheFactory.createRedisTemplate(ymsRedisCode);
        return redisTemplate;
    }
}
